<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type="text/css">
/*先看下大致的步骤：
1.定义class，绘制一个矩形；
2.用border-radius属性进行对其圆角处理；
3.使用pseudo元素创建蜷缩角；
4.创建条文渐变的效果。*/
/*这里要注意下："display"默认属性值是"inline",所以我们要使用"block"这个属性值以保证其正确显示：这里的linear-gradient是渐变效果设置，请参考本文了解其详细用法。*/
.docIcon { 
   background: #eee; 
   background: -webkit-linear-gradient(top, #ddd 0, #eee 15%, #fff 40%, #fff 70%, #eee 100%); 
   background: -moz-linear-gradient(top, #ddd 0, #eee 15%, #fff 40%, #fff 70%, #eee 100%); 
   background: -o-linear-gradient(top, #ddd 0, #eee 15%, #fff 40%, #fff 70%, #eee 100%); 
   background: -ms-linear-gradient(top, #ddd 0, #eee 15%, #fff 40%, #fff 70%, #eee 100%); 
   background: linear-gradient(top, #ddd 0, #eee 15%, #fff 40%, #fff 70%, #eee 100%); 
   border: 1px solid #ccc; 
   display: block; 
   width: 40px; 
   height: 56px; 
   position: relative; 
   margin: 42px auto; 
} 
/*下面加上阴影效果，使用"box-shadow "属性来实现：*/
.docIcon 
{ 
   ... 
    -webkit-box-shadow:inset rgba(255,255,255,0.8) 0 1px 1px; 
    -moz-box-shadow:inset rgba(255,255,255,0.8) 0 1px 1px; 
    box-shadow:inset rgba(255,255,255,0.8) 0 1px 1px; 
    text-indent:-9999em; 
} 

/*第二部：用border-radius属性进行对其圆角处理：*/ 

.docIcon 
{ 
    ... 
    -webkit-border-radius:3px 15px 3px 3px; 
    -moz-border-radius:3px 15px 3px 3px; 
    border-radius:3px 15px 3px 3px; 
} 
/*Ps:这里要着重提示下：before是一个伪类选择器，仅支持firefox、opera、chrome。
大家可能对下面俩步不太了解，这个没关系，我会针对它们另外写一篇详细的文章。在这个实例当中，大家只要知道我们用到过"：before""：after"这个俩个伪类选择器即可。*/
.docIcon:before { 
   content: ""; 
   display: block; 
   position: absolute; 
   top: 0; 
   right: 0; 
   width: 15px; 
   height: 15px; 
   background: #ccc; 
   background: -webkit-linear-gradient(45deg, #fff 0, #eee 50%, #ccc 100%); 
   background: -moz-linear-gradient(45deg, #fff 0, #eee 50%, #ccc 100%); 
   background: -o-linear-gradient(45deg, #fff 0, #eee 50%, #ccc 100%); 
   background: -ms-linear-gradient(45deg, #fff 0, #eee 50%, #ccc 100%); 
   background: linear-gradient(45deg, #fff 0, #eee 50%, #ccc 100%); 
   -webkit-box-shadow: rgba(0,0,0,0.05) -1px 1px 1px, inset white 0 0 1px; 
   -moz-box-shadow: rgba(0,0,0,0.05) -1px 1px 1px, inset white 0 0 1px; 
   box-shadow: rgba(0,0,0,0.05) -1px 1px 1px, inset white 0 0 1px; 
   border-bottom: 1px solid #ccc; 
   border-left: 1px solid #ccc; 
} 

/*margin-left和margin-right各20%（也就是100%）：*/
.docIcon:after 
{ 
    content:""; 
    display:block; 
    position:absolute; 
    left:0; 
    top:0; 
    width:60%; 
    margin:22px 20% 0; 
    height:15px; 
} 

/*用CSS3实现多条线渐变：*/
.docIcon:after 
{ 
    ... 
    background:#ccc; 
    background: -webkit-linear-gradient(top, #ccc 0, #ccc 20%, #fff 20%, #fff 40%, #ccc 40%, #ccc 60%, #fff 60%, #fff 80%, #ccc 80%, #ccc 100%); 
    background: -moz-linear-gradient(top, #ccc 0, #ccc 20%, #fff 20%, #fff 40%, #ccc 40%, #ccc 60%, #fff 60%, #fff 80%, #ccc 80%, #ccc 100%); 
    background: -o-linear-gradient(top, #ccc 0, #ccc 20%, #fff 20%, #fff 40%, #ccc 40%, #ccc 60%, #fff 60%, #fff 80%, #ccc 80%, #ccc 100%); 
    background: -ms-linear-gradient(top, #ccc 0, #ccc 20%, #fff 20%, #fff 40%, #ccc 40%, #ccc 60%, #fff 60%, #fff 80%, #ccc 80%, #ccc 100%); 
    background:linear-gradient(top, #ccc 0, #ccc 20%, #fff 20%, #fff 40%, #ccc 40%, #ccc 60%, #fff 60%, #fff 80%, #ccc 80%, #ccc 100%); 
} 
</style>
</head>

<body>
<a class="docIcon" href="#">Document Icon</a>
</body>
</html>
